<template>
	<view class="productItem">
		<view class="date-wrapper">
			<view class="date">
				申请时间：2024.09.10 09:10:58
			</view>
			<view class="status">
				已完成
			</view>
			<uni-icons type="right" class="icon" color="#ababab" size="16"></uni-icons>
		</view>
		<view class="info-wrapper">
			<image :src="'https://picsum.photos/200?random='+index" mode="widthFix" class="product-image"></image>
			<view class="info">
				<view class="title">
					品名：辰实东北圆茄子{{ index }}
				</view>
				<view class="number">
					货号：67890
				</view>
				<view class="spec-wrapper">
					<!-- <view class="price">
						￥28.8/件
					</view> -->
					<view class="spec">
						毛重13斤 净重 10斤
					</view>
				</view>
			</view>
		</view>
		<view class="delivery-quantity first">
			<view class="item">
				申请原因：少货-收到的货比订货数量少
			</view>
		</view>
		<view class="delivery-quantity">
			<view class="item">
				缺损重量：10斤
			</view>
			<view class="item right">
				申请退款：120元
			</view>
		</view>
		<view class="btn-wrapper">
			<view class="btn primary">
				审核
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			index: {
				type: Number,
				default () {
					return 0
				}
			}
		},
		data() {
			return {

			}
		},
		mounted() {

		},
		methods: {

		},
		components: {

		}
	}
</script>

<style lang="scss" scoped>
	.productItem {
		background-color: #ffffff;
		border-radius: 10upx;
		padding: 20upx;

		.date-wrapper {
			display: flex;
			align-items: center;
			font-size: 32upx;
			margin-bottom: 20upx;

			.date {
				flex: 1;
			}
		}

		.info-wrapper {
			display: flex;

			.product-image {
				width: 140upx;
				height: 140upx;
				margin-right: 20upx;
				border-radius: 10upx;
			}

			.info {
				flex: 1;

				.title {
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
					font-size: 32upx;
					line-height: 32upx;
					margin-bottom: 20upx;
				}

				.number {
					font-size: 28upx;
					color: #555555;
					line-height: 28upx;
					margin-bottom: 20upx;
				}

				.spec-wrapper {
					display: flex;
					align-items: center;

					.price {
						font-size: 34upx;
						font-weight: bold;
						color: #FC003B;
						margin-right: 20upx;
					}

					.spec {
						font-size: 28upx;
						color: #555;
					}
				}
			}
		}

		.delivery-quantity {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding-top: 20upx;


			&.first {
				border-top: 1upx solid #efefef;
				margin-top: 20upx;
			}

			.item {
				flex: 1;
				font-size: 30upx;

				&.center {
					text-align: center;
				}

				&.right {
					text-align: right;
				}
			}
		}

		.btn-wrapper {
			display: flex;
			align-items: center;
			justify-content: flex-end;
			margin-top: 15upx;

			.date {
				flex: 1;
				font-size: 24upx;
				color: #666;
			}

			.btn {
				padding: 8upx 40upx;
				background-color: #ffffff;
				border: 1upx solid #898989;
				border-radius: 10upx;
				font-size: 28upx;
				margin-left: 15upx;

				&.primary {
					color: #ffffff;
					background-color: #018737;
					border-color: #018737;
				}
			}
		}
	}
</style>